import request from "@/utils/request";

//获取部门列表
export function getDepartments() {
    return request({ url: `/company/department`, method: 'get' })
}

//删除某个部门
export function delDepartmentById(id) {
    return request({ url: `/company/department/${id}`, method: 'delete' })
}

//新增部门
export function addDepartment(data) {
    return request({ url: `/company/department`, method: 'post', data })
}

//根据id获取部门信息
export function getDepartmentById(id){
    return request({url:`/company/department/${id}`,method:"get"})
}


//修改id获取部门信息
export function setDepartmentById(id,data){
    return request({url:`/company/department/${id}`,method:"put",data})
}